package com.sharainy.service.impl;


import com.sharainy.dao.AgreementMapper;
import com.sharainy.dao.MeterMapper;
import com.sharainy.pojo.Meter;
import com.sharainy.service.MeterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MeterServiceImpl implements MeterService {
    @Autowired
    private MeterMapper meterMapper;
    @Autowired
    private AgreementMapper agreementMapper;
    @Override
    public List<Meter> selectMeter(Map<String, String> map) {
        return meterMapper.selectMeter(map);
    }

    @Override
    public Meter selectMeterById(String id) {
        Meter meter = meterMapper.selectMeterById(id);
        if (meter!=null) {

        }
        return  meter;
    }

    @Override
    public void addMeter(Meter meter) {
        meterMapper.addMeter(meter);
    }

    @Override
    public void deleteMeter(String id) {
        meterMapper.deleteMeter(id);
    }

    @Override
    public void updateMeter(Meter meter) {
        meterMapper.updateMeter(meter);
    }

    @Override
    public void setMeterStateToU(String id) {
        meterMapper.setMeterStateToU(id);
    }
}
